|
In number theory, the Stern–Brocot tree is an infinite complete binary tree in which the vertices correspond one-for-one to the positive rational numbers, whose values are ordered from left to right as in a search tree. The Stern–Brocot tree was discovered independently by and . Stern was a German number theorist; Brocot was a French clockmaker who used the Stern–Brocot tree to design systems of gears with a gear ratio close to some desired value by finding a ratio of smooth numbers near that value. The root of the Stern–Brocot tree corresponds to the number 1. The parent-child relation between numbers in the Stern–Brocot tree may be defined in terms of continued fractions or mediants, and a path in the tree from the root to any other number ''q'' provides a sequence of approximations to ''q'' with smaller denominators than ''q''. Because the tree contains each positive rational number exactly once, a breadth first search of the tree provides a method of listing all positive rationals that is closely related to Farey sequences. ==A tree of continued fractions== Every positive rational number ''q'' may be expressed as a continued fraction of the form : where ''k'' and ''a''0 are non-negative integers, and each subsequent coefficient ''ai'' is a positive integer. This representation is not unique because one has : for every sequence of coefficients ''a''0, ..., ''a''''k''−1. Using this identity to rewrite any representation of the former form into the latter form, one may obtain that the final coefficient satisfies (unless , in which case one obtains ''a''0 ≥ 1); with this additional requirement the representation becomes unique. Then, unless , the number ''q'' has a parent in the Stern–Brocot tree given by the continued fraction expression : which in case one can rewrite as . For instance, the rational number has the continued fraction representation : This parent is formed by decreasing the denominator in the innermost term of the continued fraction by 1, and contracting with the previous term if the fraction becomes . Conversely each number ''q'' in the Stern–Brocot tree has exactly two children: if : then one child is the number represented by the continued fraction : while the other child is represented by the continued fraction : One of these children is less than ''q'' and this is the left child; the other is greater than ''q'' and it is the right child (in fact the former expression gives the left child if ''k'' is odd, and the right child if ''k'' is even). For instance, the continued fraction representation of is It is clear that for each finite continued fraction expression one can repeatedly move to its parent, and reach the root 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Stern–Brocot tree」の詳細全文を読む スポンサード リンク
|